package com.zzh.dialog;


import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

/**
 * Created by zzh on 2024/1/17.
 *
 * @date: 2024/1/17 10:09
 * @email: zzh_hz@126.com
 * @author: zzh
 * @description: com.zzh.dialog
 */
public class LayoutInflaterFactory implements LayoutInflater.Factory2 {
    private final AppCompatActivity aca;

    public LayoutInflaterFactory(AppCompatActivity aca) {
        this.aca = aca;
    }

    @Override
    public View onCreateView(@Nullable View parent, @NonNull String name, @NonNull Context context, @NonNull AttributeSet attrs) {

        return aca.onCreateView(parent, name, context, attrs);
    }

    @Override
    public View onCreateView(@NonNull String name, @NonNull Context context, @NonNull AttributeSet attrs) {
        return aca.onCreateView(name, context, attrs);
    }
}
